

import 'package:flustars/flustars.dart';
import 'package:flutter/material.dart';
import 'package:moonplay/pages/tencentplayer/util/common_util.dart';
import 'package:moonplay/pages/tencentplayer/window_video_page.dart';


class TestTencentPage extends StatefulWidget {
  @override
  _TestTencentPageState createState() => _TestTencentPageState();
}

class _TestTencentPageState extends State<TestTencentPage> {
  Orientation get orientation => MediaQuery.of(context).orientation;
  double _height;
  Future _futureBuilderFuture;

  @override
  void initState() {
    super.initState();
    _height = ScreenUtil.getInstance().screenWidth;
  }
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      body: bodyWidget()
    );
  }

  Widget bodyWidget(){
    String networkMp4 = 'https://www.fztxylgy.com:65/20200927/FsUCLoba/index.m3u8';
    return Column(
      children: <Widget>[
        Container(
          width: double.infinity,
          color: Colors.black,
          height: orientation == Orientation.portrait ? ScreenUtil().getWidthPx(480) : _height, // 这里随意
          child: WindowVideoPage(playType: PlayType.network, dataSource: networkMp4,),
        ),
        Expanded(
          child: Container(
            color: Colors.white,
            child: Column(
              children: <Widget>[
                Container(
                  color: Colors.red[100],
                  child: Text("详情内容"),
                ),
              ],
            ),
          ),
        ),
      ],
    );
  }
}